package com.why.rpc.core.server.config;

import com.why.simpleboot.core.configration.ConfigurationFactory;
import com.why.simpleboot.core.configration.SimpleBootConfiguration;

/**
 * @program: why-simpleboot-framework
 * @description:
 * @author: @why
 * @create: 2021-06-15 12:34
 **/
public class WhyRpcConfigPorperties {
    public static final String[] CONFIG_NAMES = {"why.rpc.port", "why.rpc.host"};


    public static int getPort(){
        SimpleBootConfiguration config = ConfigurationFactory.getConfig();
        return  config.getInt(CONFIG_NAMES[0]);
    }

    public static String getHost(){
        SimpleBootConfiguration config = ConfigurationFactory.getConfig();
        return  config.getString(CONFIG_NAMES[1]);
    }
}
